Tableau URL actions

Tightening feedback loops and deep linking
https://bvancil.github.io/tableau-url-actions/

Brian Vancil

2023-10-17

learning goals

  1. the difference between automating and informating
  2. how to create a URL action in Tableau
  3. when to create a URL action in Tableau by looking at 3 case studies
    1. 🔁 Pre-populating fields on a dashboard feedback form with Google Forms
    2. 🌡️ Identifying bad data using data quality dashboards with Qualtrics
    3. 🔍 Linking back to a source system with Slate

philosophy of helpfulness

Bear lying down with the text, our users aren't lazy; they deserve the best user experience.

informating

Note

Informating is a term coined by Shoshana Zuboff in the book In the Age of the Smart Machine (1988). You can think of it as turning something into useable information.

examples

  1. Instead of displaying an employee’s ID, create a structured link to their detail page in your human resources system.
  2. Instead of displaying weird records in a data quality dashboard, link back to where users can fix them.
  3. If a student has taken a particular course, link to a dashboard where you can see how others have fared.

creating a URL action

Click on Dashboard and then Actions

Click menu Dashboard > Actions…

Click Add Action, then 'Go to URL...'

Then click the Add Action button and select “Go to URL…”

creating a URL action

  1. Give the URL Action a good name, since it will be the link text when you use Run action on Menu.
  2. The URL is the most important part. Start simple and build complexity iteratively!
Add URL Action dialog

case study 🔁: feedback via Google Forms

🔁results

test dashboard

Dashboard with a link to 'Give feedback'

🔁 functionality

Tableau pop-up window showing URL action

Pre-filled information on feedback form

🔁 how it works in Google Forms

Click on “⁝” > “Get pre-filled link”

🔁 how it works in Google Forms

When you click “Get link” and then “COPY LINK”, you’ll get something like (where I have added spaces and line breaks for readability):

https://docs.google.com/forms/d/e/1FAIpQLSdm28hTNGWKTXT 5vk1Wmk3c_BuDvsmnShylr6FLGGx0vaQdyw/viewform ?usp=pp_url &entry.1727620612=First+Name &entry.838417280=Last+Name &entry.908520332=__other_option__ &entry.908520332.other_option_response=other+dashboard

🔁 GET URLs

meaning URL part
protocol https://
server name docs.google.com
path /forms/d/e/.../viewform
start of GET query ?
key=URL-encoded value usp=pp_url
separator &
key=URL-encoded value entry.908520332=Retention+%26+progression
separator &
key=URL-encoded value entry.1727620612=<Username>
separator &
key=URL-encoded value entry.838417280=<Full name>

URL broken up into multiple pieces. These should all be on one line.

References: permadi.com introduction to URL encoding

🔁 how it works in Tableau

List of two dashboard actions, Give feedback on dashboard A and Give feedback on dashboard B. Both are Menu actions that use Username and Full name.

🔁 what to prepopulate

The calculation Username is just the string My Tableau Server User Name in upper camel case

The calculation Full name is just the string My Full Name

🔁 create a feedback sheet

Create a sheet with Username and Full name on details. You can also create a tooltip Privacy Notice Privacy Notice tooltip stating that we will pass the following values to Google Forms

🔁 edit the action

Edit URL action to add a menu action using a given URL.

case study: 🌡️ Data quality via Qualtrics

🌡️ results

test dashboard

Dashboard with a link to 'Give feedback about this data point'

🌡️ functionality

Pre-filled form

🌡️ add parameters to a survey

References: Qualtrics. “Passing information via query strings”.

Click on the Survey flow button

Click on the “Survey flow” button.

🌡️ survey flow

Survey flow that sets id, user, and name from the URL

Set Embedded Data variables from the URL

🌡️ use embedded data variables

Set an individual field

Use Embedded Data variable in default value with the syntax ${e://Field/fieldname}

🌡️ conclusions

After this, the work in Tableau is nearly identical to the Google Forms case.

Clicking on feedback dot brings up link.

Feedback dot approach

case study: 🔍 deep-linking into Slate

🔍 warning!

🚧🏗👷‍♀️👷‍♂️🏗🚧 This section is a work-in-progress.

🔍 creating Slate URLs

Slate report IDs look like:

/manage/report/render?id=reportUUID&parameter1Id=parameter1Value&

A UUID/GUID is what Slate uses internally to refer to certain data elements as well as queries and reports.

🔍 add parameter to report

Click “Edit Report” and then “Edit” to bring up the “Edit Report” dialog so that you can enter the parameters in the “Parameters” box. To define a parameter called StudentID, I used the XML markup <param id="StudentID" />.

Edit Report dialog box

🔍 add a report part

Add a “Data/Charts” or “Data Explorer” part. The “Query” part didn’t work for me.

Edit Part dialog box with Data Table as Type

🔍 use parameter in a filter

Use the syntax @variablename to in a filter to access the parameter.

🔍 all filled out

🔍 it works…

for Data Explorer and Data/Charts, but I couldn’t make it work for the Query report part.

Important

Error: Must declare the scalar variable “@StudentID”.

conclusion

caveats and tips

  • Be sure that you are exporting FERPA-covered data elements to encrypted web services (i.e., those with https:// URLs).
  • Tableau checks that a URL scheme is valid before activating the URL action, so test with a simple case and grow iteratively more complex.
  • If you turn on URL encoding, it encodes all parameters and variables, even a base URL, so use care!
  • Include variables you want to use on Detail. Otherwise, you may not see the URL action.

more information

resources

github.com/bvancil/tableau-url-actions


presentation

https://bvancil.github.io/tableau-url-actions/